package com.example.tests;


import org.testng.annotations.Test;

public class ContactCreationTests extends TestBase {
	@Test
	public void testNonEmptyContactCreation() throws Exception {
		app.getNavigationHelper().openMainPage();
		app.getContactHelper().initContactCreation();
		ContactData contact = new ContactData();
		contact.firstname  = "alla";
		contact.lastname = "lomaka";
		contact.address = "minsk";
		contact.home = "12345678";
		contact.mobile = "87654321";
		contact.work = "101010";
	    contact.email = "test@test.us";
	    contact.email2 = "allalomaka@gmail.com";
	    contact.bday = "20";
	    contact.bmonth = "January";
	    contact.byear = "1984";
	    contact.group = "group 1";
	    contact.address2 = "brest";
	    contact.phone2 = "123123";
		app.getContactHelper().fillContactForm(contact);
		app.getContactHelper().submitContactCreation();
		app.getContactHelper().returnToHomePage();
	}
	
	@Test
	public void testEmptyContactCreation() throws Exception {
		app.getNavigationHelper().openMainPage();
		app.getContactHelper().initContactCreation();
		app.getContactHelper().fillContactForm(new ContactData("", "", "", "", "", "", "", "", "-", "-", "-", "[none]", "", ""));
		app.getContactHelper().submitContactCreation();
		app.getContactHelper().returnToHomePage();
	}
}
